<?php

class Domaci extends BaseDomaci
{
    public function save(PropelPDO $con = null)
    {
        if(!$this->getDatum() and $this->getCas())
          $this->setDatum($this->getCas()->getDatum());
        else if(!$this->getDatum() and !$this->getCas())
          $this->setDatum(time());

        parent::save();
    }
}
